package com.algo.rpc.client;

import java.util.concurrent.ConcurrentHashMap;

public class RpcRequestTimeHolder {

    private ConcurrentHashMap<String, Long> requestStartTimeMap = new ConcurrentHashMap<String, Long>();

    public void put(String requestId, Long startTime) {
        requestStartTimeMap.put(requestId, startTime);
    }

    public void remove(String requestId) {
        requestStartTimeMap.remove(requestId);
    }

    public Long get(String requestId) {
        return requestStartTimeMap.get(requestId);
    }

}
